package com.guigu.buy.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageInfo;
import com.guigu.buy.dto.CellUtils;
import com.guigu.buy.pojo.StorageDetails;
import com.guigu.buy.service.IStockDetailsService;
import com.guigu.buy.service.IStorageDetailsService;
import com.guigu.buy.vo.CellVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.stereotype.Controller;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author com.guigu
 * @since 2024-05-15
 */
@CrossOrigin
@Controller
@RequestMapping("/buy/stockDetails")
public class StockDetailsController {
    @Autowired
    private IStockDetailsService stockDetailsService;
    @RequestMapping("/list/{pageSize}/{pageNo}")
    @ResponseBody
    public PageInfo<CellUtils> list(@PathVariable int pageSize,
                                    @PathVariable int pageNo,
                                    @RequestBody CellVo vo){
        return stockDetailsService.queryAll(pageNo,pageSize,vo);
    }
}
